package com.artwork.common.enums;

/**
 * Exception的错误代码 与 错误信息 的 枚举
 */
public enum JsonResultEnum {

    UNKONW_ERROR(-1, "未知错误"),
    SUCCESS(0, "成功"),

    TARGET_NULL(100, "对象不存在"),
    ADMIN_USER_NULL(101, "管理员用户名不存在！"),
    ADMIN_PASS_ERROR(102, "密码输入错误！"),
    ADMIN_USER_LOCKING(103, "该管理员已被系统锁定！"),
    USER_NULL(104, "用户不存在"),
    USER_EXISTS(105, "用户已存在"),
    USER_OPENID_NULL(106,"支付宝验证失败"),

    ORDER_NULL(202, "订单不存在"),
    ORDER_EXISTS(203, "重复下单"),

    BOX_NULL(303, "箱体不存在"),
    SIGN_EXISTS(304, "重复签到"),

    BALANCE_INSUFFICIENT(401,"余额不足"),
    ;

    private Integer code;

    private String msg;

    JsonResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
